/*
 Navicat Premium Data Transfer

 Source Server         : 47.108.227.85云pg
 Source Server Type    : PostgreSQL
 Source Server Version : 90224 (90224)
 Source Host           : 47.108.227.85:5432
 Source Catalog        : siyu_dev
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 90224 (90224)
 File Encoding         : 65001

 Date: 30/07/2024 16:20:14
*/


-- ----------------------------
-- Sequence structure for gen_table_column_column_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."gen_table_column_column_id_seq";
CREATE SEQUENCE "public"."gen_table_column_column_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for gen_table_table_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."gen_table_table_id_seq";
CREATE SEQUENCE "public"."gen_table_table_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_config_config_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_config_config_id_seq";
CREATE SEQUENCE "public"."sys_config_config_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_dept_dept_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_dept_dept_id_seq";
CREATE SEQUENCE "public"."sys_dept_dept_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_dict_data_dict_code_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_dict_data_dict_code_seq";
CREATE SEQUENCE "public"."sys_dict_data_dict_code_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_dict_type_dict_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_dict_type_dict_id_seq";
CREATE SEQUENCE "public"."sys_dict_type_dict_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_job_job_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_job_job_id_seq";
CREATE SEQUENCE "public"."sys_job_job_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_job_log_job_log_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_job_log_job_log_id_seq";
CREATE SEQUENCE "public"."sys_job_log_job_log_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_logininfor_info_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_logininfor_info_id_seq";
CREATE SEQUENCE "public"."sys_logininfor_info_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_menu_menu_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_menu_menu_id_seq";
CREATE SEQUENCE "public"."sys_menu_menu_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_notice_notice_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_notice_notice_id_seq";
CREATE SEQUENCE "public"."sys_notice_notice_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_oper_log_oper_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_oper_log_oper_id_seq";
CREATE SEQUENCE "public"."sys_oper_log_oper_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_post_post_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_post_post_id_seq";
CREATE SEQUENCE "public"."sys_post_post_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_role_role_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_role_role_id_seq";
CREATE SEQUENCE "public"."sys_role_role_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Sequence structure for sys_user_user_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."sys_user_user_id_seq";
CREATE SEQUENCE "public"."sys_user_user_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

-- ----------------------------
-- Table structure for gen_table
-- ----------------------------
DROP TABLE IF EXISTS "public"."gen_table";
CREATE TABLE "public"."gen_table" (
  "table_id" int8 NOT NULL DEFAULT nextval('gen_table_table_id_seq'::regclass),
  "table_name" varchar(200) COLLATE "pg_catalog"."default",
  "table_comment" varchar(500) COLLATE "pg_catalog"."default",
  "sub_table_name" varchar(64) COLLATE "pg_catalog"."default",
  "sub_table_fk_name" varchar(64) COLLATE "pg_catalog"."default",
  "class_name" varchar(100) COLLATE "pg_catalog"."default",
  "tpl_category" varchar(200) COLLATE "pg_catalog"."default",
  "tpl_web_type" varchar(30) COLLATE "pg_catalog"."default",
  "package_name" varchar(100) COLLATE "pg_catalog"."default",
  "module_name" varchar(30) COLLATE "pg_catalog"."default",
  "business_name" varchar(30) COLLATE "pg_catalog"."default",
  "function_name" varchar(50) COLLATE "pg_catalog"."default",
  "function_author" varchar(50) COLLATE "pg_catalog"."default",
  "gen_type" char(1) COLLATE "pg_catalog"."default",
  "gen_path" varchar(200) COLLATE "pg_catalog"."default",
  "options" varchar(1000) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."gen_table"."table_id" IS '编号';
COMMENT ON COLUMN "public"."gen_table"."table_name" IS '表名称';
COMMENT ON COLUMN "public"."gen_table"."table_comment" IS '表描述';
COMMENT ON COLUMN "public"."gen_table"."sub_table_name" IS '关联子表的表名';
COMMENT ON COLUMN "public"."gen_table"."sub_table_fk_name" IS '子表关联的外键名';
COMMENT ON COLUMN "public"."gen_table"."class_name" IS '实体类名称';
COMMENT ON COLUMN "public"."gen_table"."tpl_category" IS '使用的模板（crud单表操作 tree树表操作）';
COMMENT ON COLUMN "public"."gen_table"."tpl_web_type" IS '前端模板类型（element-ui模版 element-plus模版）';
COMMENT ON COLUMN "public"."gen_table"."package_name" IS '生成包路径';
COMMENT ON COLUMN "public"."gen_table"."module_name" IS '生成模块名';
COMMENT ON COLUMN "public"."gen_table"."business_name" IS '生成业务名';
COMMENT ON COLUMN "public"."gen_table"."function_name" IS '生成功能名';
COMMENT ON COLUMN "public"."gen_table"."function_author" IS '生成功能作者';
COMMENT ON COLUMN "public"."gen_table"."gen_type" IS '生成代码方式（0zip压缩包 1自定义路径）';
COMMENT ON COLUMN "public"."gen_table"."gen_path" IS '生成路径（不填默认项目路径）';
COMMENT ON COLUMN "public"."gen_table"."options" IS '其它生成选项';
COMMENT ON COLUMN "public"."gen_table"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."gen_table"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."gen_table"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."gen_table"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."gen_table"."remark" IS '备注';
COMMENT ON TABLE "public"."gen_table" IS '代码生成业务表';

-- ----------------------------
-- Table structure for gen_table_column
-- ----------------------------
DROP TABLE IF EXISTS "public"."gen_table_column";
CREATE TABLE "public"."gen_table_column" (
  "column_id" int8 NOT NULL DEFAULT nextval('gen_table_column_column_id_seq'::regclass),
  "table_id" varchar(64) COLLATE "pg_catalog"."default",
  "column_name" varchar(200) COLLATE "pg_catalog"."default",
  "column_comment" varchar(500) COLLATE "pg_catalog"."default",
  "column_type" varchar(100) COLLATE "pg_catalog"."default",
  "java_type" varchar(500) COLLATE "pg_catalog"."default",
  "java_field" varchar(200) COLLATE "pg_catalog"."default",
  "is_pk" char(1) COLLATE "pg_catalog"."default",
  "is_increment" char(1) COLLATE "pg_catalog"."default",
  "is_required" char(1) COLLATE "pg_catalog"."default",
  "is_insert" char(1) COLLATE "pg_catalog"."default",
  "is_edit" char(1) COLLATE "pg_catalog"."default",
  "is_list" char(1) COLLATE "pg_catalog"."default",
  "is_query" char(1) COLLATE "pg_catalog"."default",
  "query_type" varchar(200) COLLATE "pg_catalog"."default",
  "html_type" varchar(200) COLLATE "pg_catalog"."default",
  "dict_type" varchar(200) COLLATE "pg_catalog"."default",
  "sort" int4,
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."gen_table_column"."column_id" IS '编号';
COMMENT ON COLUMN "public"."gen_table_column"."table_id" IS '归属表编号';
COMMENT ON COLUMN "public"."gen_table_column"."column_name" IS '列名称';
COMMENT ON COLUMN "public"."gen_table_column"."column_comment" IS '列描述';
COMMENT ON COLUMN "public"."gen_table_column"."column_type" IS '列类型';
COMMENT ON COLUMN "public"."gen_table_column"."java_type" IS 'JAVA类型';
COMMENT ON COLUMN "public"."gen_table_column"."java_field" IS 'JAVA字段名';
COMMENT ON COLUMN "public"."gen_table_column"."is_pk" IS '是否主键（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_increment" IS '是否自增（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_required" IS '是否必填（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_insert" IS '是否为插入字段（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_edit" IS '是否编辑字段（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_list" IS '是否列表字段（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."is_query" IS '是否查询字段（1是）';
COMMENT ON COLUMN "public"."gen_table_column"."query_type" IS '查询方式（等于、不等于、大于、小于、范围）';
COMMENT ON COLUMN "public"."gen_table_column"."html_type" IS '显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）';
COMMENT ON COLUMN "public"."gen_table_column"."dict_type" IS '字典类型';
COMMENT ON COLUMN "public"."gen_table_column"."sort" IS '排序';
COMMENT ON COLUMN "public"."gen_table_column"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."gen_table_column"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."gen_table_column"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."gen_table_column"."update_time" IS '更新时间';
COMMENT ON TABLE "public"."gen_table_column" IS '代码生成业务表字段';

-- ----------------------------
-- Table structure for iot_h_l_point
-- ----------------------------
DROP TABLE IF EXISTS "public"."iot_h_l_point";
CREATE TABLE "public"."iot_h_l_point" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "rscd" varchar(64) COLLATE "pg_catalog"."default",
  "stcd" varchar(64) COLLATE "pg_catalog"."default",
  "stnm" varchar(40) COLLATE "pg_catalog"."default",
  "sttp" varchar(2) COLLATE "pg_catalog"."default",
  "mnun" varchar(50) COLLATE "pg_catalog"."default",
  "cmun" varchar(50) COLLATE "pg_catalog"."default",
  "addvcd" varchar(12) COLLATE "pg_catalog"."default",
  "vltw" varchar(40) COLLATE "pg_catalog"."default",
  "ctcd" varchar(2) COLLATE "pg_catalog"."default",
  "rvcd" varchar(8) COLLATE "pg_catalog"."default",
  "eslg" varchar(32) COLLATE "pg_catalog"."default",
  "nrlt" varchar(32) COLLATE "pg_catalog"."default",
  "hshgfl" numeric(10,2),
  "hslwfl" numeric(10,2),
  "dtpl" varchar(7) COLLATE "pg_catalog"."default",
  "ststdt" date,
  "hmstov" varchar(3000) COLLATE "pg_catalog"."default",
  "dtupdt" date,
  "enmnit" varchar(36) COLLATE "pg_catalog"."default",
  "posid" varchar(36) COLLATE "pg_catalog"."default",
  "monittyp" varchar(36) COLLATE "pg_catalog"."default",
  "enmnitid" varchar(64) COLLATE "pg_catalog"."default",
  "workstatus" varchar(2) COLLATE "pg_catalog"."default",
  "devicesno" varchar(32) COLLATE "pg_catalog"."default",
  "devicetype" varchar(2) COLLATE "pg_catalog"."default",
  "budstatus" varchar(1) COLLATE "pg_catalog"."default",
  "substatus" varchar(1) COLLATE "pg_catalog"."default",
  "dmcd" varchar(2) COLLATE "pg_catalog"."default",
  "weight" numeric(5,2)
)
;
COMMENT ON COLUMN "public"."iot_h_l_point"."id" IS '主键';
COMMENT ON COLUMN "public"."iot_h_l_point"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."iot_h_l_point"."stcd" IS '测站代码';
COMMENT ON COLUMN "public"."iot_h_l_point"."stnm" IS '测站名称';
COMMENT ON COLUMN "public"."iot_h_l_point"."sttp" IS '测站类型
1=水文站
2=水位站
3=降水量站
4=水面蒸发站
5=地下水站（井）
6=水质站
7=土壤墒情站
9=其他';
COMMENT ON COLUMN "public"."iot_h_l_point"."mnun" IS '管理单位';
COMMENT ON COLUMN "public"."iot_h_l_point"."cmun" IS '主管单位';
COMMENT ON COLUMN "public"."iot_h_l_point"."addvcd" IS '所在地行政区划代码';
COMMENT ON COLUMN "public"."iot_h_l_point"."vltw" IS '所在乡镇';
COMMENT ON COLUMN "public"."iot_h_l_point"."ctcd" IS '所在流域代码';
COMMENT ON COLUMN "public"."iot_h_l_point"."rvcd" IS '所在河流代码';
COMMENT ON COLUMN "public"."iot_h_l_point"."eslg" IS '东经';
COMMENT ON COLUMN "public"."iot_h_l_point"."nrlt" IS '北纬';
COMMENT ON COLUMN "public"."iot_h_l_point"."hshgfl" IS '历史最大洪峰流量 m3/S';
COMMENT ON COLUMN "public"."iot_h_l_point"."hslwfl" IS '历史最小枯水流量 m3/S';
COMMENT ON COLUMN "public"."iot_h_l_point"."dtpl" IS '水准基面';
COMMENT ON COLUMN "public"."iot_h_l_point"."ststdt" IS '设站日期';
COMMENT ON COLUMN "public"."iot_h_l_point"."hmstov" IS '水文测站概况';
COMMENT ON COLUMN "public"."iot_h_l_point"."dtupdt" IS '数据更新日期';
COMMENT ON COLUMN "public"."iot_h_l_point"."enmnit" IS '工情监测项目 11:雨量 12:水位';
COMMENT ON COLUMN "public"."iot_h_l_point"."posid" IS '工程部位编码';
COMMENT ON COLUMN "public"."iot_h_l_point"."monittyp" IS '监测类型 1=位移，2=渗流 3=渗压 4=环境量 5=变形（预留）';
COMMENT ON COLUMN "public"."iot_h_l_point"."enmnitid" IS '监测项目ID';
COMMENT ON COLUMN "public"."iot_h_l_point"."workstatus" IS '工作状态 0=未启用，1=启用';
COMMENT ON COLUMN "public"."iot_h_l_point"."devicesno" IS '设备编码';
COMMENT ON COLUMN "public"."iot_h_l_point"."devicetype" IS '设备类型 1=雨量，2=水位';
COMMENT ON COLUMN "public"."iot_h_l_point"."budstatus" IS '建站状态（1、在建，2、已建）';
COMMENT ON COLUMN "public"."iot_h_l_point"."weight" IS '权重';
COMMENT ON TABLE "public"."iot_h_l_point" IS '水文测站基本信息表';

-- ----------------------------
-- Table structure for qrtz_blob_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_blob_triggers";
CREATE TABLE "public"."qrtz_blob_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "blob_data" bytea
)
;

-- ----------------------------
-- Table structure for qrtz_calendars
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_calendars";
CREATE TABLE "public"."qrtz_calendars" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "calendar_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "calendar" bytea NOT NULL
)
;

-- ----------------------------
-- Table structure for qrtz_cron_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_cron_triggers";
CREATE TABLE "public"."qrtz_cron_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "cron_expression" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "time_zone_id" varchar(80) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for qrtz_fired_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_fired_triggers";
CREATE TABLE "public"."qrtz_fired_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "entry_id" varchar(95) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "instance_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "fired_time" int8 NOT NULL,
  "sched_time" int8 NOT NULL,
  "priority" int4 NOT NULL,
  "state" varchar(16) COLLATE "pg_catalog"."default" NOT NULL,
  "job_name" varchar(200) COLLATE "pg_catalog"."default",
  "job_group" varchar(200) COLLATE "pg_catalog"."default",
  "is_nonconcurrent" varchar(20) COLLATE "pg_catalog"."default",
  "requests_recovery" varchar(20) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for qrtz_job_details
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_job_details";
CREATE TABLE "public"."qrtz_job_details" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "job_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "job_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "description" varchar(250) COLLATE "pg_catalog"."default",
  "job_class_name" varchar(250) COLLATE "pg_catalog"."default" NOT NULL,
  "is_durable" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "is_nonconcurrent" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "is_update_data" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "requests_recovery" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "job_data" bytea
)
;

-- ----------------------------
-- Table structure for qrtz_locks
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_locks";
CREATE TABLE "public"."qrtz_locks" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "lock_name" varchar(40) COLLATE "pg_catalog"."default" NOT NULL
)
;

-- ----------------------------
-- Table structure for qrtz_paused_trigger_grps
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_paused_trigger_grps";
CREATE TABLE "public"."qrtz_paused_trigger_grps" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL
)
;

-- ----------------------------
-- Table structure for qrtz_scheduler_state
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_scheduler_state";
CREATE TABLE "public"."qrtz_scheduler_state" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "instance_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "last_checkin_time" int8 NOT NULL,
  "checkin_interval" int8 NOT NULL
)
;

-- ----------------------------
-- Table structure for qrtz_simple_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_simple_triggers";
CREATE TABLE "public"."qrtz_simple_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "repeat_count" int8 NOT NULL,
  "repeat_interval" int8 NOT NULL,
  "times_triggered" int8 NOT NULL
)
;

-- ----------------------------
-- Table structure for qrtz_simprop_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_simprop_triggers";
CREATE TABLE "public"."qrtz_simprop_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "str_prop_1" varchar(512) COLLATE "pg_catalog"."default",
  "str_prop_2" varchar(512) COLLATE "pg_catalog"."default",
  "str_prop_3" varchar(512) COLLATE "pg_catalog"."default",
  "int_prop_1" int4,
  "int_prop_2" int4,
  "long_prop_1" int8,
  "long_prop_2" int8,
  "dec_prop_1" numeric(13,4),
  "dec_prop_2" numeric(13,4),
  "bool_prop_1" varchar(2) COLLATE "pg_catalog"."default",
  "bool_prop_2" varchar(2) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Table structure for qrtz_triggers
-- ----------------------------
DROP TABLE IF EXISTS "public"."qrtz_triggers";
CREATE TABLE "public"."qrtz_triggers" (
  "sched_name" varchar(120) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "job_name" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "job_group" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "description" varchar(250) COLLATE "pg_catalog"."default",
  "next_fire_time" int8,
  "prev_fire_time" int8,
  "priority" int4,
  "trigger_state" varchar(16) COLLATE "pg_catalog"."default" NOT NULL,
  "trigger_type" varchar(8) COLLATE "pg_catalog"."default" NOT NULL,
  "start_time" int8 NOT NULL,
  "end_time" int8,
  "calendar_name" varchar(200) COLLATE "pg_catalog"."default",
  "misfire_instr" int2,
  "job_data" bytea
)
;

-- ----------------------------
-- Table structure for sk_reservoir_duty_person
-- ----------------------------
DROP TABLE IF EXISTS "public"."sk_reservoir_duty_person";
CREATE TABLE "public"."sk_reservoir_duty_person" (
  "id" int8 NOT NULL,
  "rscd" varchar(36) COLLATE "pg_catalog"."default" NOT NULL,
  "rsnm" varchar(20) COLLATE "pg_catalog"."default",
  "name" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "unit" varchar(64) COLLATE "pg_catalog"."default",
  "duty" varchar(32) COLLATE "pg_catalog"."default",
  "duty_person" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "mobile" varchar(15) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "creator" varchar(32) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "modifier" varchar(32) COLLATE "pg_catalog"."default",
  "emergencycontact" varchar(15) COLLATE "pg_catalog"."default",
  "emergencycontactphone" varchar(15) COLLATE "pg_catalog"."default",
  "trainingtime" varchar(15) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."id" IS '主键';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."rsnm" IS '水库名称';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."name" IS '姓名';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."unit" IS '单位';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."duty" IS '职务';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."duty_person" IS '责任人类型';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."mobile" IS '手机号';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."creator" IS '创建人';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."update_time" IS '修改时间';
COMMENT ON COLUMN "public"."sk_reservoir_duty_person"."modifier" IS '修改人';
COMMENT ON TABLE "public"."sk_reservoir_duty_person" IS '水库责任人基础信息表';

-- ----------------------------
-- Table structure for st_dayev_r
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_dayev_r";
CREATE TABLE "public"."st_dayev_r" (
  "stcd" varchar(8) COLLATE "pg_catalog"."default",
  "tm" timestamp(6),
  "eptp" varchar(1) COLLATE "pg_catalog"."default",
  "dye" numeric(53,2),
  "id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."st_dayev_r"."stcd" IS '测站编码';
COMMENT ON COLUMN "public"."st_dayev_r"."tm" IS '时间';
COMMENT ON COLUMN "public"."st_dayev_r"."eptp" IS '蒸发器类型';
COMMENT ON COLUMN "public"."st_dayev_r"."dye" IS '时段蒸发量';
COMMENT ON COLUMN "public"."st_dayev_r"."id" IS '主键id';
COMMENT ON TABLE "public"."st_dayev_r" IS '日蒸发量表-日蒸发量表用于存储测站列报的日蒸发量资料。';

-- ----------------------------
-- Table structure for st_pptn_r_future
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_pptn_r_future";
CREATE TABLE "public"."st_pptn_r_future" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "stcd" varchar(36) COLLATE "pg_catalog"."default",
  "tm" timestamp(6),
  "drp" numeric(5,1),
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "intv" numeric(5,2),
  "pdr" numeric(5,2),
  "dyp" numeric(5,1),
  "wth" varchar(1) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."st_pptn_r_future"."id" IS '主键id';
COMMENT ON COLUMN "public"."st_pptn_r_future"."stcd" IS '站点编码';
COMMENT ON COLUMN "public"."st_pptn_r_future"."tm" IS '时间';
COMMENT ON COLUMN "public"."st_pptn_r_future"."drp" IS '小时雨量';
COMMENT ON COLUMN "public"."st_pptn_r_future"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."st_pptn_r_future"."dyp" IS '日雨量';
COMMENT ON TABLE "public"."st_pptn_r_future" IS '预测降雨数据表';

-- ----------------------------
-- Table structure for st_pptn_r_laste
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_pptn_r_laste";
CREATE TABLE "public"."st_pptn_r_laste" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "stcd" varchar(36) COLLATE "pg_catalog"."default",
  "tm" timestamp(6),
  "drp" numeric(5,1),
  "intv" numeric(5,2),
  "pdr" numeric(5,2),
  "dyp" numeric(5,1),
  "wth" varchar(1) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."st_pptn_r_laste"."id" IS '主键ID';
COMMENT ON COLUMN "public"."st_pptn_r_laste"."drp" IS '小时雨量';
COMMENT ON COLUMN "public"."st_pptn_r_laste"."dyp" IS '日雨量';
COMMENT ON TABLE "public"."st_pptn_r_laste" IS '雨量历史数据表';

-- ----------------------------
-- Table structure for st_pptn_r_sence
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_pptn_r_sence";
CREATE TABLE "public"."st_pptn_r_sence" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "sence_id" varchar(36) COLLATE "pg_catalog"."default",
  "tm" timestamp(0),
  "drp" numeric(5,1),
  "intv" numeric(5,2),
  "pdr" numeric(5,2),
  "dyp" numeric(5,1),
  "wth" varchar(1) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."st_pptn_r_sence"."id" IS '主键ID';
COMMENT ON COLUMN "public"."st_pptn_r_sence"."sence_id" IS '对应情景id';
COMMENT ON COLUMN "public"."st_pptn_r_sence"."drp" IS '小时雨量';
COMMENT ON COLUMN "public"."st_pptn_r_sence"."dyp" IS '日雨量';
COMMENT ON TABLE "public"."st_pptn_r_sence" IS '情景降雨数据表';

-- ----------------------------
-- Table structure for st_river_r
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_river_r";
CREATE TABLE "public"."st_river_r" (
  "stcd" varchar(40) COLLATE "pg_catalog"."default",
  "tm" timestamp(6),
  "z" numeric(5,2),
  "q" numeric(5,2),
  "id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."st_river_r"."stcd" IS '测站编码';
COMMENT ON COLUMN "public"."st_river_r"."tm" IS '时间';
COMMENT ON COLUMN "public"."st_river_r"."z" IS '水位';
COMMENT ON COLUMN "public"."st_river_r"."q" IS '流量';
COMMENT ON COLUMN "public"."st_river_r"."id" IS '主键id';
COMMENT ON TABLE "public"."st_river_r" IS '河道水情表-河道水情表用于存储河道水文（水位）站测报的河道水情信息。';

-- ----------------------------
-- Table structure for st_rsvr_r_laste
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_rsvr_r_laste";
CREATE TABLE "public"."st_rsvr_r_laste" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "stcd" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "tm" timestamp(0),
  "rz" numeric(7,2),
  "inq" numeric(9,2),
  "w" numeric(9,2),
  "blrz" numeric(7,2),
  "otq" numeric(9,2),
  "rwchrcd" varchar(1) COLLATE "pg_catalog"."default",
  "rwptn" varchar(1) COLLATE "pg_catalog"."default",
  "inqdr" numeric(5,2),
  "msqmt" char(1) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."id" IS '主键ID';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."stcd" IS '测站编码';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."tm" IS '时间';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."rz" IS '库上水位 单位：m';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."inq" IS '入库流量 单位：m³/s';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."w" IS '蓄水量 单位：10^6m³';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."blrz" IS '库下水位 单位：m';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."otq" IS '出库流量  单位：m³/s';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."rwchrcd" IS '库水特征码 1、干涸2、断流3、流向不定 4、逆流  5、起涨  6、洪峰  P、水电厂发电流量';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."rwptn" IS '库水水势  4、平落 5、涨  6、ping';
COMMENT ON COLUMN "public"."st_rsvr_r_laste"."msqmt" IS '测流方法  1、水位流量关系曲线 2、浮标及溶液测流发 3、流速仪及量水建筑物 4、估算法  5、ADCP  6、电功率反推发  9、其他方法';
COMMENT ON TABLE "public"."st_rsvr_r_laste" IS '水库水情信息表';

-- ----------------------------
-- Table structure for st_zqrl_b
-- ----------------------------
DROP TABLE IF EXISTS "public"."st_zqrl_b";
CREATE TABLE "public"."st_zqrl_b" (
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "z" numeric(7,2),
  "q" numeric(7,2),
  "dtupdt" date
)
;
COMMENT ON COLUMN "public"."st_zqrl_b"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."st_zqrl_b"."z" IS '水库';
COMMENT ON COLUMN "public"."st_zqrl_b"."q" IS '泄量';
COMMENT ON COLUMN "public"."st_zqrl_b"."dtupdt" IS '数据更新日期';
COMMENT ON TABLE "public"."st_zqrl_b" IS '水位流量关系曲线';

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_config";
CREATE TABLE "public"."sys_config" (
  "config_id" int8 NOT NULL DEFAULT nextval('sys_config_config_id_seq'::regclass),
  "config_name" varchar(100) COLLATE "pg_catalog"."default",
  "config_key" varchar(100) COLLATE "pg_catalog"."default",
  "config_value" varchar(500) COLLATE "pg_catalog"."default",
  "config_type" char(1) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_config"."config_id" IS '参数主键';
COMMENT ON COLUMN "public"."sys_config"."config_name" IS '参数名称';
COMMENT ON COLUMN "public"."sys_config"."config_key" IS '参数键名';
COMMENT ON COLUMN "public"."sys_config"."config_value" IS '参数键值';
COMMENT ON COLUMN "public"."sys_config"."config_type" IS '系统内置（Y是 N否）';
COMMENT ON COLUMN "public"."sys_config"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_config"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_config"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_config"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_config"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_config" IS '参数配置表';

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dept";
CREATE TABLE "public"."sys_dept" (
  "dept_id" int8 NOT NULL DEFAULT nextval('sys_dept_dept_id_seq'::regclass),
  "parent_id" int8 DEFAULT 0,
  "ancestors" varchar(50) COLLATE "pg_catalog"."default",
  "dept_name" varchar(30) COLLATE "pg_catalog"."default",
  "order_num" int4,
  "leader" varchar(20) COLLATE "pg_catalog"."default",
  "phone" varchar(11) COLLATE "pg_catalog"."default",
  "email" varchar(50) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "del_flag" char(1) COLLATE "pg_catalog"."default" DEFAULT 0,
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."sys_dept"."dept_id" IS '部门id';
COMMENT ON COLUMN "public"."sys_dept"."parent_id" IS '父部门id';
COMMENT ON COLUMN "public"."sys_dept"."ancestors" IS '祖级列表';
COMMENT ON COLUMN "public"."sys_dept"."dept_name" IS '部门名称';
COMMENT ON COLUMN "public"."sys_dept"."order_num" IS '显示顺序';
COMMENT ON COLUMN "public"."sys_dept"."leader" IS '负责人';
COMMENT ON COLUMN "public"."sys_dept"."phone" IS '联系电话';
COMMENT ON COLUMN "public"."sys_dept"."email" IS '邮箱';
COMMENT ON COLUMN "public"."sys_dept"."status" IS '部门状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_dept"."del_flag" IS '删除标志（0代表存在 2代表删除）';
COMMENT ON COLUMN "public"."sys_dept"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_dept"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_dept"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_dept"."update_time" IS '更新时间';
COMMENT ON TABLE "public"."sys_dept" IS '部门表';

-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dict_data";
CREATE TABLE "public"."sys_dict_data" (
  "dict_code" int8 NOT NULL DEFAULT nextval('sys_dict_data_dict_code_seq'::regclass),
  "dict_sort" int4,
  "dict_label" varchar(100) COLLATE "pg_catalog"."default",
  "dict_value" varchar(100) COLLATE "pg_catalog"."default",
  "dict_type" varchar(100) COLLATE "pg_catalog"."default",
  "css_class" varchar(100) COLLATE "pg_catalog"."default",
  "list_class" varchar(100) COLLATE "pg_catalog"."default",
  "is_default" char(1) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_dict_data"."dict_code" IS '字典编码';
COMMENT ON COLUMN "public"."sys_dict_data"."dict_sort" IS '字典排序';
COMMENT ON COLUMN "public"."sys_dict_data"."dict_label" IS '字典标签';
COMMENT ON COLUMN "public"."sys_dict_data"."dict_value" IS '字典键值';
COMMENT ON COLUMN "public"."sys_dict_data"."dict_type" IS '字典类型';
COMMENT ON COLUMN "public"."sys_dict_data"."css_class" IS '样式属性（其他样式扩展）';
COMMENT ON COLUMN "public"."sys_dict_data"."list_class" IS '表格回显样式';
COMMENT ON COLUMN "public"."sys_dict_data"."is_default" IS '是否默认（Y是 N否）';
COMMENT ON COLUMN "public"."sys_dict_data"."status" IS '状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_dict_data"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_dict_data"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_dict_data"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_dict_data"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_dict_data"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_dict_data" IS '字典数据表';

-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dict_type";
CREATE TABLE "public"."sys_dict_type" (
  "dict_id" int8 NOT NULL DEFAULT nextval('sys_dict_type_dict_id_seq'::regclass),
  "dict_name" varchar(100) COLLATE "pg_catalog"."default",
  "dict_type" varchar(100) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_dict_type"."dict_id" IS '字典主键';
COMMENT ON COLUMN "public"."sys_dict_type"."dict_name" IS '字典名称';
COMMENT ON COLUMN "public"."sys_dict_type"."dict_type" IS '字典类型';
COMMENT ON COLUMN "public"."sys_dict_type"."status" IS '状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_dict_type"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_dict_type"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_dict_type"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_dict_type"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_dict_type"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_dict_type" IS '字典类型表';

-- ----------------------------
-- Table structure for sys_job
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_job";
CREATE TABLE "public"."sys_job" (
  "job_id" int8 NOT NULL DEFAULT nextval('sys_job_job_id_seq'::regclass),
  "job_name" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "job_group" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "invoke_target" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
  "cron_expression" varchar(255) COLLATE "pg_catalog"."default",
  "misfire_policy" varchar(20) COLLATE "pg_catalog"."default",
  "concurrent" char(1) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_job"."job_id" IS '任务ID';
COMMENT ON COLUMN "public"."sys_job"."job_name" IS '任务名称';
COMMENT ON COLUMN "public"."sys_job"."job_group" IS '任务组名';
COMMENT ON COLUMN "public"."sys_job"."invoke_target" IS '调用目标字符串';
COMMENT ON COLUMN "public"."sys_job"."cron_expression" IS 'cron执行表达式';
COMMENT ON COLUMN "public"."sys_job"."misfire_policy" IS '计划执行错误策略（1立即执行 2执行一次 3放弃执行）';
COMMENT ON COLUMN "public"."sys_job"."concurrent" IS '是否并发执行（0允许 1禁止）';
COMMENT ON COLUMN "public"."sys_job"."status" IS '状态（0正常 1暂停）';
COMMENT ON COLUMN "public"."sys_job"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_job"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_job"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_job"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_job"."remark" IS '备注信息';
COMMENT ON TABLE "public"."sys_job" IS '定时任务调度表';

-- ----------------------------
-- Table structure for sys_job_log
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_job_log";
CREATE TABLE "public"."sys_job_log" (
  "job_log_id" int8 NOT NULL DEFAULT nextval('sys_job_log_job_log_id_seq'::regclass),
  "job_name" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "job_group" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "invoke_target" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
  "job_message" varchar(500) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "exception_info" varchar(2000) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."sys_job_log"."job_log_id" IS '任务日志ID';
COMMENT ON COLUMN "public"."sys_job_log"."job_name" IS '任务名称';
COMMENT ON COLUMN "public"."sys_job_log"."job_group" IS '任务组名';
COMMENT ON COLUMN "public"."sys_job_log"."invoke_target" IS '调用目标字符串';
COMMENT ON COLUMN "public"."sys_job_log"."job_message" IS '日志信息';
COMMENT ON COLUMN "public"."sys_job_log"."status" IS '执行状态（0正常 1失败）';
COMMENT ON COLUMN "public"."sys_job_log"."exception_info" IS '异常信息';
COMMENT ON COLUMN "public"."sys_job_log"."create_time" IS '创建时间';
COMMENT ON TABLE "public"."sys_job_log" IS '定时任务调度日志表';

-- ----------------------------
-- Table structure for sys_logininfor
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_logininfor";
CREATE TABLE "public"."sys_logininfor" (
  "info_id" int8 NOT NULL DEFAULT nextval('sys_logininfor_info_id_seq'::regclass),
  "user_name" varchar(50) COLLATE "pg_catalog"."default",
  "ipaddr" varchar(128) COLLATE "pg_catalog"."default",
  "login_location" varchar(255) COLLATE "pg_catalog"."default",
  "browser" varchar(50) COLLATE "pg_catalog"."default",
  "os" varchar(50) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "msg" varchar(255) COLLATE "pg_catalog"."default",
  "login_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."sys_logininfor"."info_id" IS '访问ID';
COMMENT ON COLUMN "public"."sys_logininfor"."user_name" IS '用户账号';
COMMENT ON COLUMN "public"."sys_logininfor"."ipaddr" IS '登录IP地址';
COMMENT ON COLUMN "public"."sys_logininfor"."login_location" IS '登录地点';
COMMENT ON COLUMN "public"."sys_logininfor"."browser" IS '浏览器类型';
COMMENT ON COLUMN "public"."sys_logininfor"."os" IS '操作系统';
COMMENT ON COLUMN "public"."sys_logininfor"."status" IS '登录状态（0成功 1失败）';
COMMENT ON COLUMN "public"."sys_logininfor"."msg" IS '提示消息';
COMMENT ON COLUMN "public"."sys_logininfor"."login_time" IS '访问时间';
COMMENT ON TABLE "public"."sys_logininfor" IS '系统访问记录';

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_menu";
CREATE TABLE "public"."sys_menu" (
  "menu_id" int8 NOT NULL DEFAULT nextval('sys_menu_menu_id_seq'::regclass),
  "menu_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "parent_id" int8 DEFAULT 0,
  "order_num" int4,
  "path" varchar(200) COLLATE "pg_catalog"."default",
  "component" varchar(255) COLLATE "pg_catalog"."default",
  "query" varchar(255) COLLATE "pg_catalog"."default",
  "is_frame" int4,
  "is_cache" int4 DEFAULT 0,
  "menu_type" char(1) COLLATE "pg_catalog"."default",
  "visible" char(1) COLLATE "pg_catalog"."default",
  "status" int2,
  "perms" varchar(100) COLLATE "pg_catalog"."default",
  "icon" varchar(100) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_menu"."menu_id" IS '菜单ID';
COMMENT ON COLUMN "public"."sys_menu"."menu_name" IS '菜单名称';
COMMENT ON COLUMN "public"."sys_menu"."parent_id" IS '父菜单ID';
COMMENT ON COLUMN "public"."sys_menu"."order_num" IS '显示顺序';
COMMENT ON COLUMN "public"."sys_menu"."path" IS '路由地址';
COMMENT ON COLUMN "public"."sys_menu"."component" IS '组件路径';
COMMENT ON COLUMN "public"."sys_menu"."query" IS '路由参数';
COMMENT ON COLUMN "public"."sys_menu"."is_frame" IS '是否为外链（0是 1否）';
COMMENT ON COLUMN "public"."sys_menu"."is_cache" IS '是否缓存（0缓存 1不缓存）';
COMMENT ON COLUMN "public"."sys_menu"."menu_type" IS '菜单类型（M目录 C菜单 F按钮）';
COMMENT ON COLUMN "public"."sys_menu"."visible" IS '菜单状态（0显示 1隐藏）';
COMMENT ON COLUMN "public"."sys_menu"."status" IS '菜单状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_menu"."perms" IS '权限标识';
COMMENT ON COLUMN "public"."sys_menu"."icon" IS '菜单图标';
COMMENT ON COLUMN "public"."sys_menu"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_menu"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_menu"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_menu"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_menu"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_menu" IS '菜单权限表';

-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_notice";
CREATE TABLE "public"."sys_notice" (
  "notice_id" int8 NOT NULL DEFAULT nextval('sys_notice_notice_id_seq'::regclass),
  "notice_title" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "notice_type" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "notice_content" text COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_notice"."notice_id" IS '公告ID';
COMMENT ON COLUMN "public"."sys_notice"."notice_title" IS '公告标题';
COMMENT ON COLUMN "public"."sys_notice"."notice_type" IS '公告类型（1通知 2公告）';
COMMENT ON COLUMN "public"."sys_notice"."notice_content" IS '公告内容';
COMMENT ON COLUMN "public"."sys_notice"."status" IS '公告状态（0正常 1关闭）';
COMMENT ON COLUMN "public"."sys_notice"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_notice"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_notice"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_notice"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_notice"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_notice" IS '通知公告表';

-- ----------------------------
-- Table structure for sys_oper_log
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_oper_log";
CREATE TABLE "public"."sys_oper_log" (
  "oper_id" int8 NOT NULL DEFAULT nextval('sys_oper_log_oper_id_seq'::regclass),
  "title" varchar(50) COLLATE "pg_catalog"."default",
  "business_type" int4,
  "method" varchar(100) COLLATE "pg_catalog"."default",
  "request_method" varchar(10) COLLATE "pg_catalog"."default",
  "operator_type" int4,
  "oper_name" varchar(50) COLLATE "pg_catalog"."default",
  "dept_name" varchar(50) COLLATE "pg_catalog"."default",
  "oper_url" varchar(255) COLLATE "pg_catalog"."default",
  "oper_ip" varchar(128) COLLATE "pg_catalog"."default",
  "oper_location" varchar(255) COLLATE "pg_catalog"."default",
  "oper_param" varchar(2000) COLLATE "pg_catalog"."default",
  "json_result" varchar(2000) COLLATE "pg_catalog"."default",
  "status" int4,
  "error_msg" varchar(2000) COLLATE "pg_catalog"."default",
  "oper_time" timestamp(6),
  "cost_time" int8 DEFAULT 0
)
;
COMMENT ON COLUMN "public"."sys_oper_log"."oper_id" IS '日志主键';
COMMENT ON COLUMN "public"."sys_oper_log"."title" IS '模块标题';
COMMENT ON COLUMN "public"."sys_oper_log"."business_type" IS '业务类型（0其它 1新增 2修改 3删除）';
COMMENT ON COLUMN "public"."sys_oper_log"."method" IS '方法名称';
COMMENT ON COLUMN "public"."sys_oper_log"."request_method" IS '请求方式';
COMMENT ON COLUMN "public"."sys_oper_log"."operator_type" IS '操作类别（0其它 1后台用户 2手机端用户）';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_name" IS '操作人员';
COMMENT ON COLUMN "public"."sys_oper_log"."dept_name" IS '部门名称';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_url" IS '请求URL';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_ip" IS '主机地址';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_location" IS '操作地点';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_param" IS '请求参数';
COMMENT ON COLUMN "public"."sys_oper_log"."json_result" IS '返回参数';
COMMENT ON COLUMN "public"."sys_oper_log"."status" IS '操作状态（0正常 1异常）';
COMMENT ON COLUMN "public"."sys_oper_log"."error_msg" IS '错误消息';
COMMENT ON COLUMN "public"."sys_oper_log"."oper_time" IS '操作时间';
COMMENT ON TABLE "public"."sys_oper_log" IS '操作日志记录';

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_post";
CREATE TABLE "public"."sys_post" (
  "post_id" int8 NOT NULL DEFAULT nextval('sys_post_post_id_seq'::regclass),
  "post_code" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "post_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "post_sort" int4 NOT NULL,
  "status" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_post"."post_id" IS '岗位ID';
COMMENT ON COLUMN "public"."sys_post"."post_code" IS '岗位编码';
COMMENT ON COLUMN "public"."sys_post"."post_name" IS '岗位名称';
COMMENT ON COLUMN "public"."sys_post"."post_sort" IS '显示顺序';
COMMENT ON COLUMN "public"."sys_post"."status" IS '状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_post"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_post"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_post"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_post"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_post"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_post" IS '岗位信息表';

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role";
CREATE TABLE "public"."sys_role" (
  "role_id" int8 NOT NULL DEFAULT nextval('sys_role_role_id_seq'::regclass),
  "role_name" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "role_key" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "role_sort" int4 NOT NULL,
  "data_scope" char(1) COLLATE "pg_catalog"."default",
  "menu_check_strictly" bool,
  "dept_check_strictly" bool,
  "status" char(1) COLLATE "pg_catalog"."default" NOT NULL,
  "del_flag" char(1) COLLATE "pg_catalog"."default" DEFAULT 0,
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_role"."role_id" IS '角色ID';
COMMENT ON COLUMN "public"."sys_role"."role_name" IS '角色名称';
COMMENT ON COLUMN "public"."sys_role"."role_key" IS '角色权限字符串';
COMMENT ON COLUMN "public"."sys_role"."role_sort" IS '显示顺序';
COMMENT ON COLUMN "public"."sys_role"."data_scope" IS '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）';
COMMENT ON COLUMN "public"."sys_role"."menu_check_strictly" IS '菜单树选择项是否关联显示';
COMMENT ON COLUMN "public"."sys_role"."dept_check_strictly" IS '部门树选择项是否关联显示';
COMMENT ON COLUMN "public"."sys_role"."status" IS '角色状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_role"."del_flag" IS '删除标志（0代表存在 2代表删除）';
COMMENT ON COLUMN "public"."sys_role"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_role"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_role"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_role"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_role"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_role" IS '角色信息表';

-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role_dept";
CREATE TABLE "public"."sys_role_dept" (
  "role_id" int8 NOT NULL,
  "dept_id" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."sys_role_dept"."role_id" IS '角色ID';
COMMENT ON COLUMN "public"."sys_role_dept"."dept_id" IS '部门ID';
COMMENT ON TABLE "public"."sys_role_dept" IS '角色和部门关联表';

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role_menu";
CREATE TABLE "public"."sys_role_menu" (
  "role_id" int8 NOT NULL,
  "menu_id" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."sys_role_menu"."role_id" IS '角色ID';
COMMENT ON COLUMN "public"."sys_role_menu"."menu_id" IS '菜单ID';
COMMENT ON TABLE "public"."sys_role_menu" IS '角色和菜单关联表';

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user";
CREATE TABLE "public"."sys_user" (
  "user_id" int8 NOT NULL DEFAULT nextval('sys_user_user_id_seq'::regclass),
  "dept_id" int8,
  "user_name" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "nick_name" varchar(30) COLLATE "pg_catalog"."default" NOT NULL,
  "user_type" varchar(2) COLLATE "pg_catalog"."default",
  "email" varchar(50) COLLATE "pg_catalog"."default",
  "phonenumber" varchar(11) COLLATE "pg_catalog"."default",
  "sex" char(1) COLLATE "pg_catalog"."default",
  "avatar" varchar(100) COLLATE "pg_catalog"."default",
  "password" varchar(100) COLLATE "pg_catalog"."default",
  "status" char(1) COLLATE "pg_catalog"."default",
  "del_flag" char(1) COLLATE "pg_catalog"."default" DEFAULT '0'::bpchar,
  "login_ip" varchar(128) COLLATE "pg_catalog"."default",
  "login_date" timestamp(6),
  "create_by" varchar(64) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "update_by" varchar(64) COLLATE "pg_catalog"."default",
  "update_time" timestamp(6),
  "remark" varchar(500) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."sys_user"."user_id" IS '用户ID';
COMMENT ON COLUMN "public"."sys_user"."dept_id" IS '部门ID';
COMMENT ON COLUMN "public"."sys_user"."user_name" IS '用户账号';
COMMENT ON COLUMN "public"."sys_user"."nick_name" IS '用户昵称';
COMMENT ON COLUMN "public"."sys_user"."user_type" IS '用户类型（00系统用户）';
COMMENT ON COLUMN "public"."sys_user"."email" IS '用户邮箱';
COMMENT ON COLUMN "public"."sys_user"."phonenumber" IS '手机号码';
COMMENT ON COLUMN "public"."sys_user"."sex" IS '用户性别（0男 1女 2未知）';
COMMENT ON COLUMN "public"."sys_user"."avatar" IS '头像地址';
COMMENT ON COLUMN "public"."sys_user"."password" IS '密码';
COMMENT ON COLUMN "public"."sys_user"."status" IS '帐号状态（0正常 1停用）';
COMMENT ON COLUMN "public"."sys_user"."del_flag" IS '删除标志（0代表存在 2代表删除）';
COMMENT ON COLUMN "public"."sys_user"."login_ip" IS '最后登录IP';
COMMENT ON COLUMN "public"."sys_user"."login_date" IS '最后登录时间';
COMMENT ON COLUMN "public"."sys_user"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_user"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_user"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_user"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_user"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_user" IS '用户信息表';

-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user_post";
CREATE TABLE "public"."sys_user_post" (
  "user_id" int8 NOT NULL,
  "post_id" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."sys_user_post"."user_id" IS '用户ID';
COMMENT ON COLUMN "public"."sys_user_post"."post_id" IS '岗位ID';
COMMENT ON TABLE "public"."sys_user_post" IS '用户与岗位关联表';

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user_role";
CREATE TABLE "public"."sys_user_role" (
  "user_id" int8 NOT NULL,
  "role_id" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."sys_user_role"."user_id" IS '用户ID';
COMMENT ON COLUMN "public"."sys_user_role"."role_id" IS '角色ID';
COMMENT ON TABLE "public"."sys_user_role" IS '用户和角色关联表';

-- ----------------------------
-- Table structure for t_mesuser
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_mesuser";
CREATE TABLE "public"."t_mesuser" (
  "id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
  "user_name" varchar(255) COLLATE "pg_catalog"."default",
  "phone" varchar(255) COLLATE "pg_catalog"."default",
  "job" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_mesuser"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_mesuser"."user_name" IS '用户名称';
COMMENT ON COLUMN "public"."t_mesuser"."phone" IS '用户电话';
COMMENT ON COLUMN "public"."t_mesuser"."job" IS '职务';
COMMENT ON TABLE "public"."t_mesuser" IS '预警对象表';

-- ----------------------------
-- Table structure for t_model_param
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_model_param";
CREATE TABLE "public"."t_model_param" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(64) COLLATE "pg_catalog"."default",
  "model_mark" varchar(255) COLLATE "pg_catalog"."default",
  "param_name" varchar(255) COLLATE "pg_catalog"."default",
  "param_initial" numeric(10,3),
  "param_default" numeric(5,2),
  "param_min" numeric(5,2),
  "param_max" numeric(5,2),
  "param_desc" varchar(255) COLLATE "pg_catalog"."default",
  "param_num" varchar(255) COLLATE "pg_catalog"."default",
  "rscd" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_model_param"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_model_param"."plan_id" IS '方案id/水库id';
COMMENT ON COLUMN "public"."t_model_param"."model_mark" IS '模型标识';
COMMENT ON COLUMN "public"."t_model_param"."param_name" IS '参数名称';
COMMENT ON COLUMN "public"."t_model_param"."param_initial" IS '模型最初始值';
COMMENT ON COLUMN "public"."t_model_param"."param_default" IS '模型默认值（可修改）';
COMMENT ON COLUMN "public"."t_model_param"."param_min" IS '模型参数最小值';
COMMENT ON COLUMN "public"."t_model_param"."param_max" IS '模型参数最大值';
COMMENT ON COLUMN "public"."t_model_param"."param_desc" IS '参数描述';
COMMENT ON COLUMN "public"."t_model_param"."param_num" IS '参数编码';
COMMENT ON COLUMN "public"."t_model_param"."rscd" IS '所属水库编码';
COMMENT ON TABLE "public"."t_model_param" IS 'xaj模型参数表';

-- ----------------------------
-- Table structure for t_plan
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_plan";
CREATE TABLE "public"."t_plan" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_name" varchar(255) COLLATE "pg_catalog"."default",
  "plan_type" varchar(255) COLLATE "pg_catalog"."default",
  "calc_type" varchar(255) COLLATE "pg_catalog"."default",
  "start_time" timestamp(6),
  "end_time" timestamp(6),
  "step" int4,
  "plan_desc" varchar(255) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "create_by" varchar(255) COLLATE "pg_catalog"."default",
  "nash" numeric(10,2),
  "pre_type" varchar(255) COLLATE "pg_catalog"."default",
  "total_rainfall" numeric(10,2),
  "risk_danger" varchar(255) COLLATE "pg_catalog"."default",
  "scene_type" varchar(255) COLLATE "pg_catalog"."default",
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "runoff_num" numeric(10,2)
)
;
COMMENT ON COLUMN "public"."t_plan"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_plan"."plan_name" IS '方案名称';
COMMENT ON COLUMN "public"."t_plan"."plan_type" IS '方案类型（实时、假拟、历史）';
COMMENT ON COLUMN "public"."t_plan"."calc_type" IS '计算类型（自动计算、手动计算）';
COMMENT ON COLUMN "public"."t_plan"."start_time" IS '开始时间';
COMMENT ON COLUMN "public"."t_plan"."end_time" IS '结束时间';
COMMENT ON COLUMN "public"."t_plan"."step" IS '计算步长（单位h）';
COMMENT ON COLUMN "public"."t_plan"."plan_desc" IS '方案描述';
COMMENT ON COLUMN "public"."t_plan"."create_time" IS '方案创建时间';
COMMENT ON COLUMN "public"."t_plan"."create_by" IS '创建人名称';
COMMENT ON COLUMN "public"."t_plan"."nash" IS '纳什系数';
COMMENT ON COLUMN "public"."t_plan"."pre_type" IS '预报类型（预报、预案、预演）';
COMMENT ON COLUMN "public"."t_plan"."total_rainfall" IS '总降雨量   (单位 mm)';
COMMENT ON COLUMN "public"."t_plan"."risk_danger" IS '风险隐患';
COMMENT ON COLUMN "public"."t_plan"."scene_type" IS '情景类别';
COMMENT ON COLUMN "public"."t_plan"."rscd" IS '计算水库编码';
COMMENT ON COLUMN "public"."t_plan"."runoff_num" IS '径流系数';
COMMENT ON TABLE "public"."t_plan" IS '方案信息表';

-- ----------------------------
-- Table structure for t_plan_p_condition
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_plan_p_condition";
CREATE TABLE "public"."t_plan_p_condition" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "back_time" int4,
  "rainfall" int4,
  "condition" varchar(255) COLLATE "pg_catalog"."default",
  "sequence_number" int4
)
;
COMMENT ON COLUMN "public"."t_plan_p_condition"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_plan_p_condition"."plan_id" IS '响应等级预案id';
COMMENT ON COLUMN "public"."t_plan_p_condition"."back_time" IS '回溯时间    小时 ';
COMMENT ON COLUMN "public"."t_plan_p_condition"."rainfall" IS '降雨   mm';
COMMENT ON COLUMN "public"."t_plan_p_condition"."condition" IS '条件  &  并且   |  或    0  无 ';
COMMENT ON COLUMN "public"."t_plan_p_condition"."sequence_number" IS '阈值排序序号';
COMMENT ON TABLE "public"."t_plan_p_condition" IS '预案触发条件表';

-- ----------------------------
-- Table structure for t_plan_p_document
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_plan_p_document";
CREATE TABLE "public"."t_plan_p_document" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_url" varchar(255) COLLATE "pg_catalog"."default",
  "plan_name" varchar(255) COLLATE "pg_catalog"."default",
  "year" varchar(255) COLLATE "pg_catalog"."default",
  "area" varchar(255) COLLATE "pg_catalog"."default",
  "rscd" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_plan_p_document"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_plan_p_document"."plan_url" IS '文件上传地址';
COMMENT ON COLUMN "public"."t_plan_p_document"."plan_name" IS '方案名称';
COMMENT ON COLUMN "public"."t_plan_p_document"."year" IS '年份';
COMMENT ON COLUMN "public"."t_plan_p_document"."area" IS '区';
COMMENT ON COLUMN "public"."t_plan_p_document"."rscd" IS '水库编码';
COMMENT ON TABLE "public"."t_plan_p_document" IS '预案文档信息表';

-- ----------------------------
-- Table structure for t_plan_p_material
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_plan_p_material";
CREATE TABLE "public"."t_plan_p_material" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "rescue_tools" int4,
  "basic_materials" int4,
  "set_lights" int4,
  "correspondence" int4,
  "first_aid" int4,
  "transport" int4,
  "rscd" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_plan_p_material"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_plan_p_material"."plan_id" IS '预案id';
COMMENT ON COLUMN "public"."t_plan_p_material"."rescue_tools" IS '防汛抢险工具  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."basic_materials" IS '防汛基础物资  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."set_lights" IS '应急照明设备  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."correspondence" IS '通讯设备  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."first_aid" IS '急救设备  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."transport" IS '抢险运输设备  (件)';
COMMENT ON COLUMN "public"."t_plan_p_material"."rscd" IS '水库编码';
COMMENT ON TABLE "public"."t_plan_p_material" IS '预案结果救灾物资明细表';

-- ----------------------------
-- Table structure for t_plan_p_plan
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_plan_p_plan";
CREATE TABLE "public"."t_plan_p_plan" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "plan_level" int4,
  "organization_unit" varchar(255) COLLATE "pg_catalog"."default",
  "transfer_object" varchar(255) COLLATE "pg_catalog"."default",
  "transfer_route" varchar(255) COLLATE "pg_catalog"."default",
  "resettlement_site" varchar(255) COLLATE "pg_catalog"."default",
  "safe" varchar(255) COLLATE "pg_catalog"."default",
  "danger" varchar(255) COLLATE "pg_catalog"."default",
  "aftercare" varchar(255) COLLATE "pg_catalog"."default",
  "route" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_plan_p_plan"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_plan_p_plan"."plan_id" IS '预案方案id';
COMMENT ON COLUMN "public"."t_plan_p_plan"."plan_level" IS '响应等级';
COMMENT ON COLUMN "public"."t_plan_p_plan"."organization_unit" IS '避险转移组织单位';
COMMENT ON COLUMN "public"."t_plan_p_plan"."transfer_object" IS '避险转移对象';
COMMENT ON COLUMN "public"."t_plan_p_plan"."transfer_route" IS '转移路线';
COMMENT ON COLUMN "public"."t_plan_p_plan"."resettlement_site" IS '安置点';
COMMENT ON COLUMN "public"."t_plan_p_plan"."safe" IS '安全区文件路径';
COMMENT ON COLUMN "public"."t_plan_p_plan"."danger" IS '危险区文件路径';
COMMENT ON COLUMN "public"."t_plan_p_plan"."aftercare" IS '安置点文件路径';
COMMENT ON COLUMN "public"."t_plan_p_plan"."route" IS '撤退路线文件路径';
COMMENT ON TABLE "public"."t_plan_p_plan" IS '预案详情表';

-- ----------------------------
-- Table structure for t_preview_affect_v
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_affect_v";
CREATE TABLE "public"."t_preview_affect_v" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "village_name" varchar(255) COLLATE "pg_catalog"."default",
  "district" varchar(255) COLLATE "pg_catalog"."default",
  "l_official" varchar(255) COLLATE "pg_catalog"."default",
  "inp" int4
)
;
COMMENT ON COLUMN "public"."t_preview_affect_v"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_affect_v"."plan_id" IS '预演方案id';
COMMENT ON COLUMN "public"."t_preview_affect_v"."village_name" IS '村庄名称';
COMMENT ON COLUMN "public"."t_preview_affect_v"."district" IS '所属行政区';
COMMENT ON COLUMN "public"."t_preview_affect_v"."l_official" IS '负责人';
COMMENT ON COLUMN "public"."t_preview_affect_v"."inp" IS '影响人数';
COMMENT ON TABLE "public"."t_preview_affect_v" IS '预演结果村庄影响表';

-- ----------------------------
-- Table structure for t_preview_nd
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_nd";
CREATE TABLE "public"."t_preview_nd" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "drp" numeric(5,1),
  "qt_s" numeric(10,3),
  "qt_x" numeric(10,3),
  "tm" timestamp(6)
)
;
COMMENT ON COLUMN "public"."t_preview_nd"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_nd"."plan_id" IS '情景方案id';
COMMENT ON COLUMN "public"."t_preview_nd"."drp" IS '降雨量';
COMMENT ON COLUMN "public"."t_preview_nd"."qt_s" IS '下泄流量上限';
COMMENT ON COLUMN "public"."t_preview_nd"."qt_x" IS '下泄流量下限';
COMMENT ON COLUMN "public"."t_preview_nd"."tm" IS '时间';
COMMENT ON TABLE "public"."t_preview_nd" IS '预演需求数据表';

-- ----------------------------
-- Table structure for t_preview_p_parameters
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_p_parameters";
CREATE TABLE "public"."t_preview_p_parameters" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "model_type" varchar(255) COLLATE "pg_catalog"."default",
  "ff_id" varchar(255) COLLATE "pg_catalog"."default",
  "step" int4,
  "throughfall" int4,
  "f_rainfall" int4,
  "h_level" int4,
  "i_level" int4,
  "hongcode" varchar(255) COLLATE "pg_catalog"."default",
  "startTime" timestamp(6),
  "endTime" timestamp(6)
)
;
COMMENT ON COLUMN "public"."t_preview_p_parameters"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."plan_id" IS '预演方案id';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."model_type" IS '模型类型';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."ff_id" IS '匹配洪水预报方案id';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."step" IS '计算时长';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."throughfall" IS '落地雨  mm';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."f_rainfall" IS '预报降雨  mm';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."h_level" IS '最高水位  m';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."i_level" IS '水库期初水位  m';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."hongcode" IS '洪号';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."startTime" IS '开始时间';
COMMENT ON COLUMN "public"."t_preview_p_parameters"."endTime" IS '结束时间';
COMMENT ON TABLE "public"."t_preview_p_parameters" IS '预演方案参数表 ';

-- ----------------------------
-- Table structure for t_preview_p_result
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_p_result";
CREATE TABLE "public"."t_preview_p_result" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "q_rainfall" numeric(20,1),
  "inprek" numeric(10,3),
  "inprek_time" timestamp(6),
  "invt" numeric(10,3),
  "initial_level" numeric(5,2),
  "max_drainage" numeric(10,3),
  "max_d_time" timestamp(6),
  "outqt" numeric(10,2),
  "final_level" numeric(5,2),
  "effusion_risk" varchar(255) COLLATE "pg_catalog"."default",
  "max_submerge" numeric(53,2),
  "max_s_time" timestamp(6),
  "max_s_depth" numeric(5,2),
  "r_level" numeric(5,2),
  "max_sd_time" timestamp(6),
  "d_advice" text COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_preview_p_result"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_p_result"."plan_id" IS '预演方案id';
COMMENT ON COLUMN "public"."t_preview_p_result"."q_rainfall" IS '降雨总量  (mm)';
COMMENT ON COLUMN "public"."t_preview_p_result"."inprek" IS '入库洪峰  m³/s';
COMMENT ON COLUMN "public"."t_preview_p_result"."inprek_time" IS '入库洪峰时间';
COMMENT ON COLUMN "public"."t_preview_p_result"."invt" IS '入库洪量 万m³';
COMMENT ON COLUMN "public"."t_preview_p_result"."initial_level" IS '期初水位  (m)';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_drainage" IS '最大泄流  m³/s';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_d_time" IS '最大泄流时间';
COMMENT ON COLUMN "public"."t_preview_p_result"."outqt" IS '出库洪量 万m³';
COMMENT ON COLUMN "public"."t_preview_p_result"."final_level" IS '期末水位  m';
COMMENT ON COLUMN "public"."t_preview_p_result"."effusion_risk" IS '溢流及风险情况';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_submerge" IS '最大淹没范围  ㎡';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_s_time" IS '最大淹没时间';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_s_depth" IS '最大淹没深度  m';
COMMENT ON COLUMN "public"."t_preview_p_result"."r_level" IS '水库水位  m';
COMMENT ON COLUMN "public"."t_preview_p_result"."max_sd_time" IS '最大淹没深度时间  ';
COMMENT ON COLUMN "public"."t_preview_p_result"."d_advice" IS '调度建议';
COMMENT ON TABLE "public"."t_preview_p_result" IS '预演计算结果表';

-- ----------------------------
-- Table structure for t_preview_result
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_result";
CREATE TABLE "public"."t_preview_result" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "tm" timestamp(6),
  "face_rainfall" numeric(5,1),
  "in_qt" numeric(10,3),
  "out_qt" numeric(10,3),
  "final_level" numeric(5,2)
)
;
COMMENT ON COLUMN "public"."t_preview_result"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_result"."plan_id" IS '方案id';
COMMENT ON COLUMN "public"."t_preview_result"."tm" IS '时间';
COMMENT ON COLUMN "public"."t_preview_result"."face_rainfall" IS '面雨量';
COMMENT ON COLUMN "public"."t_preview_result"."in_qt" IS '入库流量   m³/s';
COMMENT ON COLUMN "public"."t_preview_result"."out_qt" IS '出库流量   m³/s';
COMMENT ON COLUMN "public"."t_preview_result"."final_level" IS '期末水位  m';
COMMENT ON TABLE "public"."t_preview_result" IS '预演计算结果指标数据表';

-- ----------------------------
-- Table structure for t_preview_risk_a
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_risk_a";
CREATE TABLE "public"."t_preview_risk_a" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "affect" int4,
  "d_populace" numeric(5,2),
  "i_area" numeric(20,2),
  "s_depth" numeric(5,2),
  "d_houses" int4,
  "d_farmland" numeric(20,2)
)
;
COMMENT ON COLUMN "public"."t_preview_risk_a"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_preview_risk_a"."plan_id" IS '预演方案id';
COMMENT ON COLUMN "public"."t_preview_risk_a"."affect" IS '影响户数  (户)';
COMMENT ON COLUMN "public"."t_preview_risk_a"."d_populace" IS '受灾人口  (万人)';
COMMENT ON COLUMN "public"."t_preview_risk_a"."i_area" IS '淹没面积  (k㎡)';
COMMENT ON COLUMN "public"."t_preview_risk_a"."s_depth" IS '淹没深度  (m)';
COMMENT ON COLUMN "public"."t_preview_risk_a"."d_houses" IS '受灾房屋  (座)';
COMMENT ON COLUMN "public"."t_preview_risk_a"."d_farmland" IS '受灾农田  (万亩)';
COMMENT ON TABLE "public"."t_preview_risk_a" IS '预演结果风险评估表';

-- ----------------------------
-- Table structure for t_preview_sresult
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_preview_sresult";
CREATE TABLE "public"."t_preview_sresult" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar(255) COLLATE "pg_catalog"."default",
  "geojson" text COLLATE "pg_catalog"."default",
  "max_fa" numeric(10,2),
  "rsvr" int4,
  "fv" int4,
  "i_populace" int4,
  "aal" numeric(10,2),
  "ah" numeric(10,2),
  "f_storage" numeric(15,2)
)
;
COMMENT ON COLUMN "public"."t_preview_sresult"."id" IS '主键';
COMMENT ON COLUMN "public"."t_preview_sresult"."plan_id" IS '预演方案id';
COMMENT ON COLUMN "public"."t_preview_sresult"."geojson" IS 'geojson数据';
COMMENT ON COLUMN "public"."t_preview_sresult"."max_fa" IS '最大淹没面积  k㎡';
COMMENT ON COLUMN "public"."t_preview_sresult"."rsvr" IS '水库数量   个';
COMMENT ON COLUMN "public"."t_preview_sresult"."fv" IS '淹没村庄数量  个';
COMMENT ON COLUMN "public"."t_preview_sresult"."i_populace" IS '影响人口  万人';
COMMENT ON COLUMN "public"."t_preview_sresult"."aal" IS '影响耕地  k㎡';
COMMENT ON COLUMN "public"."t_preview_sresult"."ah" IS '影响房屋   k㎡';
COMMENT ON COLUMN "public"."t_preview_sresult"."f_storage" IS '拦蓄洪量  万m³';
COMMENT ON TABLE "public"."t_preview_sresult" IS '预演可视化结果数据表';

-- ----------------------------
-- Table structure for t_rain_sence
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_rain_sence";
CREATE TABLE "public"."t_rain_sence" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "sence_name" varchar(255) COLLATE "pg_catalog"."default",
  "sence_detail" varchar(255) COLLATE "pg_catalog"."default",
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "pre_type" varchar(255) COLLATE "pg_catalog"."default",
  "create_time" timestamp(0),
  "extend2" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_rain_sence"."id" IS '主键';
COMMENT ON COLUMN "public"."t_rain_sence"."sence_name" IS '降雨情景名称';
COMMENT ON COLUMN "public"."t_rain_sence"."sence_detail" IS '降雨情景描述';
COMMENT ON COLUMN "public"."t_rain_sence"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."t_rain_sence"."pre_type" IS '预报类型';
COMMENT ON COLUMN "public"."t_rain_sence"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."t_rain_sence"."extend2" IS '额外字段2';
COMMENT ON TABLE "public"."t_rain_sence" IS '降雨情景';

-- ----------------------------
-- Table structure for t_rsvr_gis
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_rsvr_gis";
CREATE TABLE "public"."t_rsvr_gis" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "rsvr_url" varchar(255) COLLATE "pg_catalog"."default",
  "up_basin_url" varchar(255) COLLATE "pg_catalog"."default",
  "down_basin_url" varchar(255) COLLATE "pg_catalog"."default",
  "up_river_url" varchar(255) COLLATE "pg_catalog"."default",
  "down_river_url" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_rsvr_gis"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_rsvr_gis"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."t_rsvr_gis"."rsvr_url" IS '水库数据地址';
COMMENT ON COLUMN "public"."t_rsvr_gis"."up_basin_url" IS '上游流域地址';
COMMENT ON COLUMN "public"."t_rsvr_gis"."down_basin_url" IS '下游流域地址';
COMMENT ON COLUMN "public"."t_rsvr_gis"."up_river_url" IS '上游河流地址';
COMMENT ON COLUMN "public"."t_rsvr_gis"."down_river_url" IS '下游河流地址';
COMMENT ON TABLE "public"."t_rsvr_gis" IS 'gis数据和水库关联表';

-- ----------------------------
-- Table structure for t_send_way
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_send_way";
CREATE TABLE "public"."t_send_way" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "way_name" varchar(255) COLLATE "pg_catalog"."default",
  "way_code" varchar(255) COLLATE "pg_catalog"."default",
  "state" int4
)
;
COMMENT ON COLUMN "public"."t_send_way"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_send_way"."way_name" IS '发送方式名称';
COMMENT ON COLUMN "public"."t_send_way"."way_code" IS '方式标识';
COMMENT ON COLUMN "public"."t_send_way"."state" IS '是否启用（0表示禁用，1表示启用）';
COMMENT ON TABLE "public"."t_send_way" IS '通知方式信息表';

-- ----------------------------
-- Table structure for t_t_dimension
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_t_dimension";
CREATE TABLE "public"."t_t_dimension" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "rsname" varchar(255) COLLATE "pg_catalog"."default",
  "ctrl_path" varchar(255) COLLATE "pg_catalog"."default",
  "i17_path" varchar(255) COLLATE "pg_catalog"."default",
  "flood_point" int4,
  "file_path" varchar(255) COLLATE "pg_catalog"."default",
  "output_path" varchar(255) COLLATE "pg_catalog"."default",
  "river_area" numeric(10,4),
  "count_type" varchar(255) COLLATE "pg_catalog"."default",
  "outgeo_path" varchar(255) COLLATE "pg_catalog"."default",
  "host_path" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_t_dimension"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_t_dimension"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."t_t_dimension"."rsname" IS '水库名称';
COMMENT ON COLUMN "public"."t_t_dimension"."ctrl_path" IS 'ctrl文件配置路径';
COMMENT ON COLUMN "public"."t_t_dimension"."i17_path" IS 'i17文件配置文件位置';
COMMENT ON COLUMN "public"."t_t_dimension"."flood_point" IS '溢流点数量';
COMMENT ON COLUMN "public"."t_t_dimension"."file_path" IS '水库文件配置总路径';
COMMENT ON COLUMN "public"."t_t_dimension"."output_path" IS '输出文件路径';
COMMENT ON COLUMN "public"."t_t_dimension"."river_area" IS '河流域面积  ㎡';
COMMENT ON COLUMN "public"."t_t_dimension"."count_type" IS '计算类型  ';
COMMENT ON COLUMN "public"."t_t_dimension"."outgeo_path" IS 'geo文件存放目录';
COMMENT ON COLUMN "public"."t_t_dimension"."host_path" IS '宿主机输出文件地址';
COMMENT ON TABLE "public"."t_t_dimension" IS '二位水动力模型文件存储信息表';

-- ----------------------------
-- Table structure for t_warn_condition
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_warn_condition";
CREATE TABLE "public"."t_warn_condition" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "c_name" varchar(255) COLLATE "pg_catalog"."default",
  "warn_grade" varchar(255) COLLATE "pg_catalog"."default",
  "warn_type" varchar(255) COLLATE "pg_catalog"."default",
  "warn_data" text COLLATE "pg_catalog"."default",
  "warn_time" timestamp(6),
  "state" int4,
  "send_content" text COLLATE "pg_catalog"."default",
  "send_way" varchar(255) COLLATE "pg_catalog"."default",
  "create_time" timestamp(6),
  "rscd" varchar(255) COLLATE "pg_catalog"."default",
  "user_ids" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_warn_condition"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_warn_condition"."c_name" IS '条件名称';
COMMENT ON COLUMN "public"."t_warn_condition"."warn_grade" IS '风险等级';
COMMENT ON COLUMN "public"."t_warn_condition"."warn_type" IS '报警类型（水位报警、雨量报警）';
COMMENT ON COLUMN "public"."t_warn_condition"."warn_data" IS '预警数据';
COMMENT ON COLUMN "public"."t_warn_condition"."warn_time" IS '报警时间';
COMMENT ON COLUMN "public"."t_warn_condition"."state" IS '发布状态（0表示未发布、1表示已发布）';
COMMENT ON COLUMN "public"."t_warn_condition"."send_content" IS '发送内容';
COMMENT ON COLUMN "public"."t_warn_condition"."send_way" IS '发送方式';
COMMENT ON COLUMN "public"."t_warn_condition"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."t_warn_condition"."rscd" IS '水库编码';
COMMENT ON COLUMN "public"."t_warn_condition"."user_ids" IS '消息绑定的用户id';
COMMENT ON TABLE "public"."t_warn_condition" IS '报警条件信息表';

-- ----------------------------
-- Table structure for t_warn_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_warn_user";
CREATE TABLE "public"."t_warn_user" (
  "id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "warn_id" varchar(255) COLLATE "pg_catalog"."default",
  "user_id" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."t_warn_user"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_warn_user"."warn_id" IS '报警条件id';
COMMENT ON COLUMN "public"."t_warn_user"."user_id" IS '报警对象id';
COMMENT ON TABLE "public"."t_warn_user" IS '报警条件-用户中间表';

-- ----------------------------
-- Table structure for t_xaj_result
-- ----------------------------
DROP TABLE IF EXISTS "public"."t_xaj_result";
CREATE TABLE "public"."t_xaj_result" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "plan_id" varchar COLLATE "pg_catalog"."default",
  "tm" varchar(53) COLLATE "pg_catalog"."default",
  "pre_q" numeric(10,2),
  "pre_z" numeric(5,2),
  "check_q" numeric(10,2),
  "net_rain" numeric(5,1),
  "area_rain" numeric(5,1)
)
;
COMMENT ON COLUMN "public"."t_xaj_result"."id" IS '主键id';
COMMENT ON COLUMN "public"."t_xaj_result"."plan_id" IS '方案id';
COMMENT ON COLUMN "public"."t_xaj_result"."tm" IS '时间';
COMMENT ON COLUMN "public"."t_xaj_result"."pre_q" IS '预报流量';
COMMENT ON COLUMN "public"."t_xaj_result"."pre_z" IS '预报水位';
COMMENT ON COLUMN "public"."t_xaj_result"."check_q" IS '校正流量';
COMMENT ON COLUMN "public"."t_xaj_result"."net_rain" IS '净雨量';
COMMENT ON COLUMN "public"."t_xaj_result"."area_rain" IS '面雨量';
COMMENT ON TABLE "public"."t_xaj_result" IS '新安江模型计算结果表';

-- ----------------------------
-- Table structure for wrp_rsr_bsin
-- ----------------------------
DROP TABLE IF EXISTS "public"."wrp_rsr_bsin";
CREATE TABLE "public"."wrp_rsr_bsin" (
  "rscd" varchar(36) COLLATE "pg_catalog"."default" NOT NULL,
  "rsnm" varchar(40) COLLATE "pg_catalog"."default",
  "alias" varchar(120) COLLATE "pg_catalog"."default",
  "prst" varchar(1) COLLATE "pg_catalog"."default",
  "prsc" varchar(1) COLLATE "pg_catalog"."default" NOT NULL,
  "prgr" varchar(1) COLLATE "pg_catalog"."default",
  "mnblgr" varchar(1) COLLATE "pg_catalog"."default",
  "mnun" varchar(50) COLLATE "pg_catalog"."default",
  "cmun" varchar(50) COLLATE "pg_catalog"."default",
  "blsys" varchar(1) COLLATE "pg_catalog"."default",
  "addvcd" varchar(12) COLLATE "pg_catalog"."default" NOT NULL,
  "vltw" varchar(40) COLLATE "pg_catalog"."default",
  "ctcd" varchar(2) COLLATE "pg_catalog"."default",
  "rvcd" varchar(64) COLLATE "pg_catalog"."default",
  "eslg" numeric(9,6),
  "nrlt" numeric(9,6),
  "eqmtpkaclt" varchar(1) COLLATE "pg_catalog"."default",
  "bsssin" varchar(1) COLLATE "pg_catalog"."default",
  "freqin" varchar(1) COLLATE "pg_catalog"."default",
  "dtpl" varchar(2) COLLATE "pg_catalog"."default",
  "cpyr" varchar(4) COLLATE "pg_catalog"."default",
  "isrg" varchar(1) COLLATE "pg_catalog"."default",
  "rsov" varchar(3000) COLLATE "pg_catalog"."default",
  "dtupdt" date,
  "focus" varchar(1) COLLATE "pg_catalog"."default",
  "sickness" varchar(1) COLLATE "pg_catalog"."default",
  "labelname" varchar(100) COLLATE "pg_catalog"."default",
  "labelid" varchar(100) COLLATE "pg_catalog"."default",
  "station" varchar(255) COLLATE "pg_catalog"."default",
  "elevation_base" varchar(255) COLLATE "pg_catalog"."default",
  "registration_number" varchar(36) COLLATE "pg_catalog"."default",
  "registration_date" date,
  "gcpj" varchar(3000) COLLATE "pg_catalog"."default",
  "modelpath3d" varchar(2000) COLLATE "pg_catalog"."default",
  "borderline" text COLLATE "pg_catalog"."default",
  "modelelevation3d" varchar(20) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."rscd" IS '水库代码';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."rsnm" IS '水库名称';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."alias" IS '别名/曾用名';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."prst" IS '工程状态';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."prsc" IS '工程规模';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."prgr" IS '工程等别';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."mnblgr" IS '主要建筑物级别';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."mnun" IS '管理单位';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."cmun" IS '主管单位';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."blsys" IS '归属部门';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."addvcd" IS '所在地点行政区划代码';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."vltw" IS '所在乡镇（水库工程所在乡镇和村的名称）';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."ctcd" IS '所在流域代码';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."rvcd" IS '所在河流代码';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."eslg" IS '东经';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."nrlt" IS '北纬';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."eqmtpkaclt" IS '地震动峰值加速度';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."bsssin" IS '地震基本烈度';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."freqin" IS '设防地震烈度';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."dtpl" IS '水准基面';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."cpyr" IS '建成年份';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."isrg" IS '注册等级与否 1、已注册 0、未注册';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."rsov" IS '水库概况';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."dtupdt" IS '数据更新日期';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."focus" IS '是否重点';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."sickness" IS '是否病险';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."labelname" IS '标签名称';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."labelid" IS '标签id';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."station" IS '是否建站(1、待建站，2、已建站)';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."elevation_base" IS '高程基面';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."registration_number" IS '注册登记号';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."registration_date" IS '注册等级时间';
COMMENT ON COLUMN "public"."wrp_rsr_bsin"."borderline" IS 'geom数据信息';
COMMENT ON TABLE "public"."wrp_rsr_bsin" IS '水库基础信息表';

-- ----------------------------
-- Table structure for wrp_rsr_hych
-- ----------------------------
DROP TABLE IF EXISTS "public"."wrp_rsr_hych";
CREATE TABLE "public"."wrp_rsr_hych" (
  "rscd" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "cnctar" numeric(10,3),
  "rvcrlen" numeric(6,2),
  "rvcrgr" numeric(6,2),
  "avanpram" numeric(5,1),
  "avanrnam" numeric(10,2),
  "avansdam" numeric(10,2),
  "myavgmintp" numeric(4,1),
  "dsrcin" numeric(5,0),
  "dspkfl" numeric(7,2),
  "dsflvlondy" numeric(10,2),
  "dsflvlthdy" numeric(10,2),
  "chrcin" numeric(5,0),
  "chpkfl" numeric(7,2),
  "chfldr" numeric(2,0),
  "chflvl" numeric(10,2),
  "rsrrgtpfm" varchar(1) COLLATE "pg_catalog"."default",
  "chfllv" numeric(6,2),
  "dsfllv" numeric,
  "flcnhgwl" numeric(6,2),
  "mjflsscnwl" numeric(6,2),
  "nrstlv" numeric(6,2),
  "ddwl" numeric(6,2),
  "ttstcp" numeric(10,2),
  "flstcp" numeric(10,2),
  "flcnstcp" numeric(10,2),
  "acstcp" numeric(10,2),
  "ddstcp" numeric(10,2),
  "dtupdt" timestamp(6),
  "zckr" numeric(10,2),
  "xxkr" numeric(10,2),
  "sjkr" numeric,
  "rwlpreseason" numeric(6,2),
  "pre_rainy_season_start" varchar(8) COLLATE "pg_catalog"."default",
  "pre_rainy_season_end" varchar(8) COLLATE "pg_catalog"."default",
  "major_flood_period_start" varchar(8) COLLATE "pg_catalog"."default",
  "major_flood_period_end" varchar(8) COLLATE "pg_catalog"."default",
  "after_fllood_season_level" numeric(8,2),
  "after_fllood_season_start" varchar(8) COLLATE "pg_catalog"."default",
  "after_fllood_season_end" varchar(8) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."wrp_rsr_hych"."rscd" IS '水库代码';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."cnctar" IS '控制流域面积  单位：km²';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."rvcrlen" IS '河道长度 单位：km';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."rvcrgr" IS '河道降比  单位：‰';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."avanpram" IS '多年平均降水量 单位：mm';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."avanrnam" IS '多年平均径流量 单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."avansdam" IS '多年平均输沙量 单位：万t';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."myavgmintp" IS '多年平均最低气温 单位：℃';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dsrcin" IS '设计重现期  单位：年一遇';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dspkfl" IS '合计洪峰流量 单位：m³/s';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dsflvlondy" IS '设计一日洪水总量 单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dsflvlthdy" IS '设计三日洪水总理  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."chrcin" IS '校核重现期 单位：年一遇';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."chpkfl" IS '校核洪峰流量  单位：m³/s';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."chfldr" IS '校核洪水历时  单位：d';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."chflvl" IS '校核洪水总量  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."rsrrgtpfm" IS '水库调节性能';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."chfllv" IS '校核洪水位 单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dsfllv" IS '设计洪水位  单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."flcnhgwl" IS '防洪高水位  单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."mjflsscnwl" IS '主汛期限制水位 单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."nrstlv" IS '正常蓄水位 单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."ddwl" IS '死水位 单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."ttstcp" IS '总库容  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."flstcp" IS '调度库容  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."flcnstcp" IS '防洪库容  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."acstcp" IS '兴利库容  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."ddstcp" IS '死库容  单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."dtupdt" IS '数据更新日期';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."zckr" IS '正常库容--扩展';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."xxkr" IS '汛限库容--扩展';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."sjkr" IS '设计库容--扩展';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."rwlpreseason" IS '前汛期限制水位 单位 m';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."pre_rainy_season_start" IS '前汛期开始月日（mm月dd日）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."pre_rainy_season_end" IS '前汛期结束月日（mm月dd日）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."major_flood_period_start" IS '主汛期开始月日（mm月dd日）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."major_flood_period_end" IS '主汛期结束月日（mm月dd日）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."after_fllood_season_level" IS '后汛期限制水位（m）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."after_fllood_season_start" IS '后汛期开始时间（mm月dd日）';
COMMENT ON COLUMN "public"."wrp_rsr_hych"."after_fllood_season_end" IS '后汛期结束时间（mm月dd日）';
COMMENT ON TABLE "public"."wrp_rsr_hych" IS '水库水位特征表';

-- ----------------------------
-- Table structure for wrp_rsr_wlstcparrl
-- ----------------------------
DROP TABLE IF EXISTS "public"."wrp_rsr_wlstcparrl";
CREATE TABLE "public"."wrp_rsr_wlstcparrl" (
  "rscd" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "wl" numeric(6,2) NOT NULL,
  "stcp" numeric(10,2) NOT NULL,
  "ar" numeric(8,2),
  "dtupdt" date
)
;
COMMENT ON COLUMN "public"."wrp_rsr_wlstcparrl"."rscd" IS '水库代码';
COMMENT ON COLUMN "public"."wrp_rsr_wlstcparrl"."wl" IS '水位 单位：m';
COMMENT ON COLUMN "public"."wrp_rsr_wlstcparrl"."stcp" IS '库容 单位：万m³';
COMMENT ON COLUMN "public"."wrp_rsr_wlstcparrl"."ar" IS '面积 单位：km²';
COMMENT ON COLUMN "public"."wrp_rsr_wlstcparrl"."dtupdt" IS '数据更新日期';
COMMENT ON TABLE "public"."wrp_rsr_wlstcparrl" IS '水位-库容-面积关系表';

-- ----------------------------
-- Function structure for find_in_set
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."find_in_set"(int8, varchar);
CREATE OR REPLACE FUNCTION "public"."find_in_set"(int8, varchar)
  RETURNS "pg_catalog"."bool" AS $BODY$
DECLARE
  STR ALIAS FOR $1;
  STRS ALIAS FOR $2;
  POS INTEGER;
  STATUS BOOLEAN;
BEGIN
	SELECT POSITION( ','||STR||',' IN ','||STRS||',') INTO POS;
	IF POS > 0 THEN
	  STATUS = TRUE;
	ELSE
	  STATUS = FALSE;
	END IF;
	RETURN STATUS; 
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;

-- ----------------------------
-- Function structure for substring_index
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."substring_index"(varchar, varchar, int4);
CREATE OR REPLACE FUNCTION "public"."substring_index"(varchar, varchar, int4)
  RETURNS "pg_catalog"."varchar" AS $BODY$
DECLARE
tokens varchar[];
length integer ;
indexnum integer;
BEGIN
tokens := pg_catalog.string_to_array($1, $2);
length := pg_catalog.array_upper(tokens, 1);
indexnum := length - ($3 * -1) + 1;
IF $3 >= 0 THEN
RETURN pg_catalog.array_to_string(tokens[1:$3], $2);
ELSE
RETURN pg_catalog.array_to_string(tokens[indexnum:length], $2);
END IF;
END;
$BODY$
  LANGUAGE plpgsql IMMUTABLE STRICT
  COST 100;

-- ----------------------------
-- View structure for list_column
-- ----------------------------
DROP VIEW IF EXISTS "public"."list_column";
CREATE VIEW "public"."list_column" AS  SELECT c.relname AS table_name, a.attname AS column_name, 
    d.description AS column_comment, 
        CASE
            WHEN a.attnotnull AND con.conname IS NULL THEN 1
            ELSE 0
        END AS is_required, 
        CASE
            WHEN con.conname IS NOT NULL THEN 1
            ELSE 0
        END AS is_pk, 
    a.attnum AS sort, 
        CASE
            WHEN "position"(pg_get_expr(ad.adbin, ad.adrelid), ((c.relname::text || '_'::text) || a.attname::text) || '_seq'::text) > 0 THEN 1
            ELSE 0
        END AS is_increment, 
    btrim(
        CASE
            WHEN t.typelem <> 0::oid AND t.typlen = (-1) THEN 'ARRAY'::text
            ELSE 
            CASE
                WHEN t.typtype = 'd'::"char" THEN format_type(t.typbasetype, NULL::integer)
                ELSE format_type(a.atttypid, NULL::integer)
            END
        END, '"'::text) AS column_type
   FROM pg_attribute a
   JOIN (pg_class c
   JOIN pg_namespace n ON c.relnamespace = n.oid) ON a.attrelid = c.oid
   LEFT JOIN pg_description d ON d.objoid = c.oid AND a.attnum = d.objsubid
   LEFT JOIN pg_constraint con ON con.conrelid = c.oid AND (a.attnum = ANY (con.conkey))
   LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
   LEFT JOIN pg_type t ON a.atttypid = t.oid
  WHERE (c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND a.attnum > 0 AND n.nspname = 'public'::name AND NOT a.attisdropped
  ORDER BY c.relname, a.attnum;

-- ----------------------------
-- View structure for list_table
-- ----------------------------
DROP VIEW IF EXISTS "public"."list_table";
CREATE VIEW "public"."list_table" AS  SELECT c.relname AS table_name, obj_description(c.oid) AS table_comment, 
    now() AS create_time, now() AS update_time
   FROM pg_class c
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE (c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND c.relname !~~ 'spatial_%'::text AND n.nspname = 'public'::name AND n.nspname <> ''::name;

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."gen_table_column_column_id_seq"
OWNED BY "public"."gen_table_column"."column_id";
SELECT setval('"public"."gen_table_column_column_id_seq"', 370, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."gen_table_table_id_seq"
OWNED BY "public"."gen_table"."table_id";
SELECT setval('"public"."gen_table_table_id_seq"', 35, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_config_config_id_seq"
OWNED BY "public"."sys_config"."config_id";
SELECT setval('"public"."sys_config_config_id_seq"', 100, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_dept_dept_id_seq"
OWNED BY "public"."sys_dept"."dept_id";
SELECT setval('"public"."sys_dept_dept_id_seq"', 110, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_dict_data_dict_code_seq"
OWNED BY "public"."sys_dict_data"."dict_code";
SELECT setval('"public"."sys_dict_data_dict_code_seq"', 29, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_dict_type_dict_id_seq"
OWNED BY "public"."sys_dict_type"."dict_id";
SELECT setval('"public"."sys_dict_type_dict_id_seq"', 11, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_job_job_id_seq"
OWNED BY "public"."sys_job"."job_id";
SELECT setval('"public"."sys_job_job_id_seq"', 8, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_job_log_job_log_id_seq"
OWNED BY "public"."sys_job_log"."job_log_id";
SELECT setval('"public"."sys_job_log_job_log_id_seq"', 1472, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_logininfor_info_id_seq"
OWNED BY "public"."sys_logininfor"."info_id";
SELECT setval('"public"."sys_logininfor_info_id_seq"', 57, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_menu_menu_id_seq"
OWNED BY "public"."sys_menu"."menu_id";
SELECT setval('"public"."sys_menu_menu_id_seq"', 2000, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_notice_notice_id_seq"
OWNED BY "public"."sys_notice"."notice_id";
SELECT setval('"public"."sys_notice_notice_id_seq"', 3, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_oper_log_oper_id_seq"
OWNED BY "public"."sys_oper_log"."oper_id";
SELECT setval('"public"."sys_oper_log_oper_id_seq"', 138, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_post_post_id_seq"
OWNED BY "public"."sys_post"."post_id";
SELECT setval('"public"."sys_post_post_id_seq"', 5, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_role_role_id_seq"
OWNED BY "public"."sys_role"."role_id";
SELECT setval('"public"."sys_role_role_id_seq"', 3, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."sys_user_user_id_seq"
OWNED BY "public"."sys_user"."user_id";
SELECT setval('"public"."sys_user_user_id_seq"', 3, false);

-- ----------------------------
-- Primary Key structure for table gen_table
-- ----------------------------
ALTER TABLE "public"."gen_table" ADD CONSTRAINT "gen_table_pkey" PRIMARY KEY ("table_id");

-- ----------------------------
-- Primary Key structure for table gen_table_column
-- ----------------------------
ALTER TABLE "public"."gen_table_column" ADD CONSTRAINT "gen_table_column_pkey" PRIMARY KEY ("column_id");

-- ----------------------------
-- Primary Key structure for table qrtz_blob_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_blob_triggers" ADD CONSTRAINT "QRTZ_BLOB_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "trigger_name", "trigger_group");

-- ----------------------------
-- Primary Key structure for table qrtz_calendars
-- ----------------------------
ALTER TABLE "public"."qrtz_calendars" ADD CONSTRAINT "QRTZ_CALENDARS_pkey" PRIMARY KEY ("sched_name", "calendar_name");

-- ----------------------------
-- Primary Key structure for table qrtz_cron_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_cron_triggers" ADD CONSTRAINT "QRTZ_CRON_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "trigger_name", "trigger_group");

-- ----------------------------
-- Primary Key structure for table qrtz_fired_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_fired_triggers" ADD CONSTRAINT "QRTZ_FIRED_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "entry_id");

-- ----------------------------
-- Primary Key structure for table qrtz_job_details
-- ----------------------------
ALTER TABLE "public"."qrtz_job_details" ADD CONSTRAINT "QRTZ_JOB_DETAILS_pkey" PRIMARY KEY ("sched_name", "job_name", "job_group");

-- ----------------------------
-- Primary Key structure for table qrtz_locks
-- ----------------------------
ALTER TABLE "public"."qrtz_locks" ADD CONSTRAINT "QRTZ_LOCKS_pkey" PRIMARY KEY ("sched_name", "lock_name");

-- ----------------------------
-- Primary Key structure for table qrtz_paused_trigger_grps
-- ----------------------------
ALTER TABLE "public"."qrtz_paused_trigger_grps" ADD CONSTRAINT "QRTZ_PAUSED_TRIGGER_GRPS_pkey" PRIMARY KEY ("sched_name", "trigger_group");

-- ----------------------------
-- Primary Key structure for table qrtz_scheduler_state
-- ----------------------------
ALTER TABLE "public"."qrtz_scheduler_state" ADD CONSTRAINT "QRTZ_SCHEDULER_STATE_pkey" PRIMARY KEY ("sched_name", "instance_name");

-- ----------------------------
-- Primary Key structure for table qrtz_simple_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_simple_triggers" ADD CONSTRAINT "QRTZ_SIMPLE_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "trigger_name", "trigger_group");

-- ----------------------------
-- Primary Key structure for table qrtz_simprop_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_simprop_triggers" ADD CONSTRAINT "QRTZ_SIMPROP_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "trigger_name", "trigger_group");

-- ----------------------------
-- Indexes structure for table qrtz_triggers
-- ----------------------------
CREATE INDEX "sched_name" ON "public"."qrtz_triggers" USING btree (
  "sched_name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "job_name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "job_group" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table qrtz_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_triggers" ADD CONSTRAINT "QRTZ_TRIGGERS_pkey" PRIMARY KEY ("sched_name", "trigger_name", "trigger_group");

-- ----------------------------
-- Primary Key structure for table st_dayev_r
-- ----------------------------
ALTER TABLE "public"."st_dayev_r" ADD CONSTRAINT "st_dayev_r_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table st_pptn_r_future
-- ----------------------------
ALTER TABLE "public"."st_pptn_r_future" ADD CONSTRAINT "st_pptn_r_future_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table st_river_r
-- ----------------------------
ALTER TABLE "public"."st_river_r" ADD CONSTRAINT "st_river_r_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table st_rsvr_r_laste
-- ----------------------------
ALTER TABLE "public"."st_rsvr_r_laste" ADD CONSTRAINT "st_rsvr_r_laste_copy1_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table sys_config
-- ----------------------------
ALTER TABLE "public"."sys_config" ADD CONSTRAINT "sys_config_pkey" PRIMARY KEY ("config_id");

-- ----------------------------
-- Primary Key structure for table sys_dept
-- ----------------------------
ALTER TABLE "public"."sys_dept" ADD CONSTRAINT "sys_dept_pkey" PRIMARY KEY ("dept_id");

-- ----------------------------
-- Primary Key structure for table sys_dict_data
-- ----------------------------
ALTER TABLE "public"."sys_dict_data" ADD CONSTRAINT "sys_dict_data_pkey" PRIMARY KEY ("dict_code");

-- ----------------------------
-- Indexes structure for table sys_dict_type
-- ----------------------------
CREATE INDEX "dict_type" ON "public"."sys_dict_type" USING btree (
  "dict_type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table sys_dict_type
-- ----------------------------
ALTER TABLE "public"."sys_dict_type" ADD CONSTRAINT "sys_dict_type_pkey" PRIMARY KEY ("dict_id");

-- ----------------------------
-- Primary Key structure for table sys_job
-- ----------------------------
ALTER TABLE "public"."sys_job" ADD CONSTRAINT "sys_job_pkey" PRIMARY KEY ("job_id", "job_name", "job_group");

-- ----------------------------
-- Primary Key structure for table sys_job_log
-- ----------------------------
ALTER TABLE "public"."sys_job_log" ADD CONSTRAINT "sys_job_log_pkey" PRIMARY KEY ("job_log_id");

-- ----------------------------
-- Primary Key structure for table sys_logininfor
-- ----------------------------
ALTER TABLE "public"."sys_logininfor" ADD CONSTRAINT "sys_logininfor_pkey" PRIMARY KEY ("info_id");

-- ----------------------------
-- Primary Key structure for table sys_menu
-- ----------------------------
ALTER TABLE "public"."sys_menu" ADD CONSTRAINT "sys_menu_pkey" PRIMARY KEY ("menu_id");

-- ----------------------------
-- Primary Key structure for table sys_notice
-- ----------------------------
ALTER TABLE "public"."sys_notice" ADD CONSTRAINT "sys_notice_pkey" PRIMARY KEY ("notice_id");

-- ----------------------------
-- Primary Key structure for table sys_oper_log
-- ----------------------------
ALTER TABLE "public"."sys_oper_log" ADD CONSTRAINT "sys_oper_log_pkey" PRIMARY KEY ("oper_id");

-- ----------------------------
-- Primary Key structure for table sys_post
-- ----------------------------
ALTER TABLE "public"."sys_post" ADD CONSTRAINT "sys_post_pkey" PRIMARY KEY ("post_id");

-- ----------------------------
-- Primary Key structure for table sys_role
-- ----------------------------
ALTER TABLE "public"."sys_role" ADD CONSTRAINT "sys_role_pkey" PRIMARY KEY ("role_id");

-- ----------------------------
-- Primary Key structure for table sys_role_dept
-- ----------------------------
ALTER TABLE "public"."sys_role_dept" ADD CONSTRAINT "sys_role_dept_pkey" PRIMARY KEY ("role_id", "dept_id");

-- ----------------------------
-- Primary Key structure for table sys_role_menu
-- ----------------------------
ALTER TABLE "public"."sys_role_menu" ADD CONSTRAINT "sys_role_menu_pkey" PRIMARY KEY ("role_id", "menu_id");

-- ----------------------------
-- Primary Key structure for table sys_user
-- ----------------------------
ALTER TABLE "public"."sys_user" ADD CONSTRAINT "sys_user_pkey" PRIMARY KEY ("user_id");

-- ----------------------------
-- Primary Key structure for table sys_user_post
-- ----------------------------
ALTER TABLE "public"."sys_user_post" ADD CONSTRAINT "sys_user_post_pkey" PRIMARY KEY ("user_id", "post_id");

-- ----------------------------
-- Primary Key structure for table sys_user_role
-- ----------------------------
ALTER TABLE "public"."sys_user_role" ADD CONSTRAINT "sys_user_role_pkey" PRIMARY KEY ("user_id", "role_id");

-- ----------------------------
-- Primary Key structure for table t_mesuser
-- ----------------------------
ALTER TABLE "public"."t_mesuser" ADD CONSTRAINT "t_mesuser_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_model_param
-- ----------------------------
ALTER TABLE "public"."t_model_param" ADD CONSTRAINT "t_model_parameter_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_plan
-- ----------------------------
ALTER TABLE "public"."t_plan" ADD CONSTRAINT "t_plan_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_plan_p_condition
-- ----------------------------
ALTER TABLE "public"."t_plan_p_condition" ADD CONSTRAINT "t_plan_d_plan_condition_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_plan_p_document
-- ----------------------------
ALTER TABLE "public"."t_plan_p_document" ADD CONSTRAINT "t_plan_p_document_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_plan_p_material
-- ----------------------------
ALTER TABLE "public"."t_plan_p_material" ADD CONSTRAINT "t_plan_p_material_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_plan_p_plan
-- ----------------------------
ALTER TABLE "public"."t_plan_p_plan" ADD CONSTRAINT "t_plan_d_plan_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_affect_v
-- ----------------------------
ALTER TABLE "public"."t_preview_affect_v" ADD CONSTRAINT "t_preview_affect_v_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_nd
-- ----------------------------
ALTER TABLE "public"."t_preview_nd" ADD CONSTRAINT "t_preview_nd_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_p_parameters
-- ----------------------------
ALTER TABLE "public"."t_preview_p_parameters" ADD CONSTRAINT "t_plan_preplay_parameters_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_p_result
-- ----------------------------
ALTER TABLE "public"."t_preview_p_result" ADD CONSTRAINT "t_preview_plan_result_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_result
-- ----------------------------
ALTER TABLE "public"."t_preview_result" ADD CONSTRAINT "t_preview_result_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_risk_a
-- ----------------------------
ALTER TABLE "public"."t_preview_risk_a" ADD CONSTRAINT "t_preview_risk_a_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_preview_sresult
-- ----------------------------
ALTER TABLE "public"."t_preview_sresult" ADD CONSTRAINT "t_preview_sresult_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_rain_sence
-- ----------------------------
ALTER TABLE "public"."t_rain_sence" ADD CONSTRAINT "t_rain_sence_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_rsvr_gis
-- ----------------------------
ALTER TABLE "public"."t_rsvr_gis" ADD CONSTRAINT "t_rsvr_gis_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_send_way
-- ----------------------------
ALTER TABLE "public"."t_send_way" ADD CONSTRAINT "t_send_way_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_t_dimension
-- ----------------------------
ALTER TABLE "public"."t_t_dimension" ADD CONSTRAINT "t_t_dimension_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_warn_condition
-- ----------------------------
ALTER TABLE "public"."t_warn_condition" ADD CONSTRAINT "t_warn_condition_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_warn_user
-- ----------------------------
ALTER TABLE "public"."t_warn_user" ADD CONSTRAINT "t_warn_user_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table t_xaj_result
-- ----------------------------
ALTER TABLE "public"."t_xaj_result" ADD CONSTRAINT "t_xaj_result_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table wrp_rsr_hych
-- ----------------------------
CREATE INDEX "wrp_rsr_hych_index" ON "public"."wrp_rsr_hych" USING btree (
  "rscd" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Foreign Keys structure for table qrtz_blob_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_blob_triggers" ADD CONSTRAINT "QRTZ_BLOB_TRIGGERS_ibfk_1" FOREIGN KEY ("sched_name", "trigger_name", "trigger_group") REFERENCES "public"."qrtz_triggers" ("sched_name", "trigger_name", "trigger_group") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Keys structure for table qrtz_cron_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_cron_triggers" ADD CONSTRAINT "QRTZ_CRON_TRIGGERS_ibfk_1" FOREIGN KEY ("sched_name", "trigger_name", "trigger_group") REFERENCES "public"."qrtz_triggers" ("sched_name", "trigger_name", "trigger_group") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Keys structure for table qrtz_simple_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_simple_triggers" ADD CONSTRAINT "QRTZ_SIMPLE_TRIGGERS_ibfk_1" FOREIGN KEY ("sched_name", "trigger_name", "trigger_group") REFERENCES "public"."qrtz_triggers" ("sched_name", "trigger_name", "trigger_group") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Keys structure for table qrtz_simprop_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_simprop_triggers" ADD CONSTRAINT "QRTZ_SIMPROP_TRIGGERS_ibfk_1" FOREIGN KEY ("sched_name", "trigger_name", "trigger_group") REFERENCES "public"."qrtz_triggers" ("sched_name", "trigger_name", "trigger_group") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Keys structure for table qrtz_triggers
-- ----------------------------
ALTER TABLE "public"."qrtz_triggers" ADD CONSTRAINT "QRTZ_TRIGGERS_ibfk_1" FOREIGN KEY ("sched_name", "job_name", "job_group") REFERENCES "public"."qrtz_job_details" ("sched_name", "job_name", "job_group") ON DELETE NO ACTION ON UPDATE NO ACTION;
